﻿//////////////////////////////////////////////////////////////////////////////
//
//  Copyright © 1998-2024 Glodon Company Limited.  All rights reserved.
//
//  Use of this software is subject to the terms of the Glodon license
//  agreement provided at the time of installation or download, or which
//  otherwise accompanies this software in either electronic or hard copy form.  
//
//////////////////////////////////////////////////////////////////////////////

// Reviewed

#pragma once

#include "GcmpCommandAction.h"
#include "IObject.h"
#include "IPickPointAction.h"
namespace gcmp
{
    class IUiView;
    class ISnapContext;

    /// \brief Ui层捕捉工具
    FINAL_INTERFACE class GCMP_COMMAND_ACTION_EXPORT UiSnapUtils
    {
    public:

        /// \brief 根据IUiView对捕捉的输入信息进行初始化
        /// 
        /// \param pSnapContext 需要被初始化的捕捉输入信息
        /// \param pUiView Ui视图
        /// \param planeType 捕捉平面的类型
        /// \return 是否更新成功，返回true表示成功，false表示失败
        static bool InitSnapContextFromUiView(ISnapContext* pSnapContext, IUiView* pUiView, PickPointExchangeData::SnapPlaneType planeType = PickPointExchangeData::SnapPlaneType::WorkPlane);
    };
}


